<?php
/**
 * The Header for wordpresscn theme.
 *
 * Displays all of the <head> section and everything up till <div id="blog">
 *
 * @package august
 */
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_directory' ); ?>/modules.css">
<link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_directory' ); ?>/engine.css">
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/ga.js" type="text/javascript" charset="utf-8"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery_003.js" type="text/javascript" charset="utf-8"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jqueryui.js" type="text/javascript" charset="utf-8"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/dle_js.js" type="text/javascript" charset="utf-8"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery-sander.js" type="text/javascript" charset="utf-8"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/animations.js" type="text/javascript" charset="utf-8"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/function.js" type="text/javascript" charset="utf-8"></script>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
	/* We add some JavaScript to pages with the comment form
	 * to support sites with threaded comments (when in use).
	 *
	if ( is_singular() && get_option( 'thread_comments' ) )
		wp_enqueue_script( 'comment-reply' );

	/* Always have wp_head() just before the closing </head>
	 * tag of your theme, or you will break many plugins, which
	 * generally use this hook to add elements to <head> such
	 * as styles, scripts, and meta tags.
	 */
	wp_head();
?>
</head>

<body>

<div class="nvig_menu">


	  <ul>

    	<li><a href="javascript:history.go(-1)"><img width="30" height="30" alt="Back" src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/nm_petv.png"></a></li>
        <li><a onclick="scroll(0,0); return false" href="#"><img width="30" height="30" alt="Top" src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/nm_on_top.png"></a></li>
      </ul>
</div>

<div id="backgroundBottom">

	<div class="siteContent">

        <div class="topHeader">
        	<h1 class="inBlock"><a href="<?php bloginfo( 'wpurl' ); ?>" class="linkLogo"><?php bloginfo('name');?></a></h1>


             <form  class="searchForm inBlock" role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
                    <input class="txtSearch segoeLi clearText" name="s" value="Search" type="text" id="s" >
                    <input class="btSearch" name="sa" src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/btSearch.png" type="image" />

            </form>



            <div class="manageAccount inBlock">

                <ul class="linksAccount segoe">
                	<li><a id="linkToConnect" href="#connexion">Login</a></li>
                    <?php wp_register(); ?>
                </ul>
            </div>

            <div class="userAvatar inBlock">
            	<span style="margin-top: -50px;" class="segoe">User Avatar</span>
            	<img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/noavatar_002.png" align="default avatar">
            </div>

        </div>
                               <!--<?php bloginfo( 'wpurl' ); ?>-->
        <div class="headerContent">
        <div style="margin-top: -268px;" class="connectPanel segoeLi">
            	<h2 class="inBlock">Login to <?php bloginfo( 'name' ); ?></h2>
                <a href="#closeConnect" class="inBlock closeConnect segoe">Exit login</a>


                <form class="cnxForm" method="post" action="<?php bloginfo( 'wpurl' ); ?>/wp-login.php">
                	<img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/connectAvatar.png" class="inBlock" align="connect avatar">
                	<div class="inBlock">
                        <input class="txtCnx clearText segoeLi" name="log" id="login_name" value="UserName" type="text">
                        <input class="txtCnx clearText segoeLi" name="pwd" id="login_password" value="Password" type="password">
                    </div>
                    <input name="login" id="login" value="submit" type="hidden">
                    <input class="btConnect inBlock" name="btConnect" value="Connexion" src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/btConnect.png" type="image">
                </form>

                                <ul class="connectLinks">
                	<li><a href="<?php bloginfo( 'wpurl' ); ?>/wp-login.php?action=lostpassword">Lost your password?</a></li>
                	<li><a href="">Register new user</a></li>
                </ul>

                <div class="dateConnect">
                	<span class="connectHour actualTime"><?php the_time('H:i');?></span><?php the_time('l');?> <span><?php the_time('j F');?></span>
                </div>
            </div>

        <div class="footerZone">

        	<div id="lastActus" class="footerBloc largeBloc segoe">
            	<div id="divDate" class="inBlock">
                	<span class="spanDay segoeLi"><?php the_time('d');?>  </span><?php the_time('F');?>  <span class="actualTime"><?php the_time('H:i');?></span>
                </div>
                <div class="contLastActus inBlock">
                	<h2 class="h2lastActus">New Posts</h2>
                    <ul class="listLastActus">
                        <?php
                            $NewPost = new WP_Query( array ( 'orderby' => 'id', 'order' => 'DESC','posts_per_page' => '4' ) );
                             while ( $NewPost->have_posts() ) : $NewPost->the_post(); ?>
                            <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">+&nbsp;<?php echo wordcut(get_the_title(),18); ?></a></li>
                        <?php
                        endwhile;
                        wp_reset_postdata();
                        ?>
                    </ul>
                </div>
            </div>

        	<div id="twitterContent" class="footerBloc largeBloc segoe">
            	<div class="inBlock"><img id="imgProfilTwitter" src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/twitter.png" alt="image profil twitter"></div>
                <div class="inBlock">
                	<h2><a href="http://twitter.com/augustyip">@AugustYip</a></h2>
                    <div id="fluxTwitter">
                	</div>
					<script type="text/javascript" src="<?php bloginfo( 'stylesheet_directory' ); ?>/js/jquery_002.js"></script>
                    <script type="text/javascript">
                        $(function(){
                            $('#fluxTwitter').tweetable({username: 'AugustYip', time: false, limit: 5, replies: true, position: 'append'});
                        });
                    </script>
                </div>
                <ul class="twitterNavigate">
                	<li><a id="PrevTweet" href="#tweetPrecedent">Tweet Previous</a></li>
                	<li><a id="NextTweet" href="#tweetSuivant">Tweet Next</a></li>
                </ul>
                <img class="logoTwitterHead" src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/logoTwitterHeader.png" align="twitter logo">
            </div>

        	<div class="footerBloc largeBloc segoe blocHotnews">
                <span id="hotTitle">Hotnews</span><a class="linkHotnews" href="#"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/1315059390_windows_8_beta_1.jpg" align="image de la news"><span style="display: block;" id="titleNews">Windows 8 Beta 1 !</span></a>
            </div>

        	<div class="footerBloc segoe">
            	<a class="linkBloc contactUs" href=""><span>Contact <br>me.</span></a>
            </div>

        </div>

        <div class="footerZone littlePadding">

        	<div class="footerBloc largeBloc segoeLi">
            	<a id="marketLink" class="linkBloc largeLink" href="" target="_blank">August Yip<span>@ Facebook</span></a>
            </div>

        	<div class="footerBloc largeBloc segoe headerPhotos">
                <a style="margin-top: -382px;" class="linkBloc largeLink" href=""><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/photos_1.jpg" align="img windows 8 2"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/photos_2.jpg" align="img windows 8 1"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/photos_3.jpg" align="img windows 8 3"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/photos_4.jpg" align="img windows 8 4"><span>Photos</span></a>
            </div>

        	<div class="footerBloc segoeLi">
            	<a class="linkBloc blocRSS" href="<?php bloginfo('rss2_url'); ?>">RSS</a>
            </div>

        	<div class="footerBloc largeBloc segoe">
            	<a class="videoLink linkBloc largeLink" href=""><span>Video</span></a>
            </div>

        </div>
        </div>


        <ul class="mainMenu segoe">
           
            <?php mytheme_nav(); ?>
        </ul>

        <div class="content">

        	<div id="slidersContent" class="segoe">
            	<ul id="menuSlider">
                    <li><a href="#TopNews"><?php echo stripslashes(get_option('AMetro_SlideTitle1')); ?></a></li>
                	<li><a href="#TopNews"><?php echo stripslashes(get_option('AMetro_SlideTitle2')); ?></a></li>
                	<li><a href="#TopNews"><?php echo stripslashes(get_option('AMetro_SlideTitle3')); ?></a></li>
                </ul>
                <div id="slidersNews">
                	<ul class="navigateSlide">
                    	<li><a id="prevSlide" href="#precedent">PrevSlide</a></li>
                    	<li><a id="pauseSlide" href="#pauselecture">PauseSlide</a></li>
                    	<li><a id="nextSlide" href="#suivant">NextSlide</a></li>
                    </ul>
               		<div style="margin-left: 0px; margin-top: 0px;" id="moveSliders">

                        <?php if (get_option('AMetro_SlideTitle1')!="") {?>
                        <ul  class="topNews" >
                             <?php
                                    $SlideArticlesIdArr1 = explode(',',get_option('AMetro_SlideArticles1'));
                                    $SlideArticles1 = new WP_Query( array( 'post__in' => $SlideArticlesIdArr1,'posts_per_page' => count($SlideArticlesIdArr1) ) );
                                    $i = 1;
                                    while ( $SlideArticles1->have_posts() ) : $SlideArticles1->the_post();
                            ?>
                                <li>
                                <div class="numNews segoeLi"><?php echo $i++;?></div>
                                <div class="infosNews">
                                    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

                                    <?php echo wordcut(get_the_content(),150); ?>
                                </div>
                                <div class="vignetteNews">
                                <img src="<?php
							if ( get_post_meta(get_the_ID(), 'slidepic', true) ) {
    							echo get_post_meta(get_the_ID(), 'slidepic', true);
							} else {
								echo bloginfo( 'stylesheet_directory' ).'/images/105x105.png';
							}
							?>
							" height="105" width="105">
                            </div>
                            </li>

                            <?php endwhile;
                            wp_reset_postdata();
                            ?>

                        </ul>

                        <?php }?>

                        <?php if (get_option('AMetro_SlideTitle2')!="") {?>
                        <ul  class="topNews" >
                             <?php
                                    $SlideArticlesIdArr2 = explode(',',get_option('AMetro_SlideArticles2'));
                                    $SlideArticles2 = new WP_Query( array( 'post__in' => $SlideArticlesIdArr2,'posts_per_page' => count($SlideArticlesIdArr2) ) );
                                    $i = 1;
                                    while ( $SlideArticles2->have_posts() ) : $SlideArticles2->the_post();
                            ?>
                                <li>
                                <div class="numNews segoeLi"><?php echo $i++;?></div>
                                <div class="infosNews">
                                    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

                                    <?php echo wordcut(get_the_content(),150); ?>
                                </div>
                                <div class="vignetteNews">
                                <img src="<?php
							if ( get_post_meta(get_the_ID(), 'slidepic', true) ) {
    							echo get_post_meta(get_the_ID(), 'slidepic', true);
							} else {
								echo bloginfo( 'stylesheet_directory' ).'/images/105x105.png';
							}
							?>
							" height="105" width="105">
                            </div>
                            </li>

                            <?php endwhile;
                            wp_reset_postdata();
                            ?>

                        </ul>

                        <?php }?>

                        <?php if (get_option('AMetro_SlideTitle3')!="") {?>
                        <ul  class="topNews" >
                             <?php
                                    $SlideArticlesIdArr3 = explode(',',get_option('AMetro_SlideArticles3'));
                                    $SlideArticles3 = new WP_Query( array( 'post__in' => $SlideArticlesIdArr3,'posts_per_page' => count($SlideArticlesIdArr3) ) );
                                    $i = 1;
                                    while ( $SlideArticles3->have_posts() ) : $SlideArticles3->the_post();
                            ?>
                                <li>
                                <div class="numNews segoeLi"><?php echo $i++;?></div>
                                <div class="infosNews">
                                    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

                                    <?php echo wordcut(get_the_content(),150); ?>
                                </div>
                                <div class="vignetteNews">
                                <img src="<?php
							if ( get_post_meta(get_the_ID(), 'slidepic', true) ) {
    							echo get_post_meta(get_the_ID(), 'slidepic', true);
							} else {
								echo bloginfo( 'stylesheet_directory' ).'/images/105x105.png';
							}
							?>
							" height="105" width="105">
                            </div>
                            </li>

                            <?php endwhile;
                            wp_reset_postdata();
                            ?>

                        </ul>

                        <?php }?>



                    </div>
                </div>
            </div>